'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace Shell

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.Shell.IControlMarkup)> _
    Public Interface IControlMarkup
        <PreserveSig()> Function SetCallback(<MarshalAs(UnmanagedType.IUnknown)> ByVal punk As Object) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetCallback(ByRef riid As Guid, <Out(), MarshalAs(UnmanagedType.Interface)> ByRef ppunk As Object) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetId(ByVal dwId As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetId(<Out()> ByRef pdwId As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFonts(ByVal hFont As IntPtr, ByVal hFontUnderline As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFonts(<Out()> ByRef phFont As IntPtr, <Out()> ByRef phFontUnderline As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetText(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwszText As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetText(<MarshalAs(UnmanagedType.Bool)> ByVal bRaw As Boolean, <Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef pwszText As String, ByRef pdwCch As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetLinkText(ByVal iLink As Integer, ByVal uMarkupLinkText As UInteger, <MarshalAs(UnmanagedType.LPWStr)> ByVal pwszText As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetLinkText(ByVal iLink As Integer, ByVal uMarkupLinkText As UInteger, <Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef pwszText As String, ByRef pdwCch As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetRenderFlags(ByVal uDT As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetRenderFlags(<Out()> ByRef puDT As UInteger, <Out()> ByRef phTheme As IntPtr, <Out()> ByRef piPartId As Integer, <Out()> ByRef piStateIdNormal As Integer, <Out()> ByRef piStateIdLink As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetThemeRenderFlags(ByVal puDT As UInteger, ByVal phTheme As IntPtr, ByVal piPartId As Integer, ByVal piStateIdNormal As Integer, ByVal piStateIdLink As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetState(ByVal iLink As Integer, ByVal uStateMask As UInteger, <Out()> ByRef puState As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetState(ByVal iLink As Integer, ByVal uStateMask As UInteger, ByVal uState As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function DrawText(ByVal hdcClient As IntPtr, ByRef prcClient As Rect) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetLinkCursor(ByVal hdc As IntPtr, ByVal uMarkUpCalc As UInteger, ByRef prc As Rect) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function CalcIdealSize() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFocus() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function KillFocus() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function IsTabbable() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnButtonDown(ByVal pt As Point) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnButtonUp(ByVal pt As Point) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnKeyDown(ByVal uVirtKey As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function HitTest(ByVal pt As Point, <Out()> ByRef piLink As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetLinkRect(ByVal iLink As Integer, <Out()> ByRef prc As RecordReadingPolicy) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetControlRect(<Out()> ByRef prcControl As Rect) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetLinkCount(<Out()> ByRef pcLinks As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace